package com.zjdiepu.www.dao.other;

import java.util.List;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.zjdiepu.www.model.other.ext.OtherMediaFailExt;
import com.zjdiepu.www.model.other.dto.OtherMediaFail;

/**
 * 多媒体处理记录dao层操作<br/>
 * @author xiongxiaotun<br/>
 * @time 2017年06月26日 10时41分<br/>
 * @since 1.0<br/>
 */
public interface OtherMediaFailMapper {
	/**
	 * 主键删除
	 * @param id
	 * @return
	 */
	int deleteByPrimaryKey(String id);

	/**
	 * 添加记录
	 * 
	 * @param otherMediaFail
	 * @return
	 */
	int insert(OtherMediaFail otherMediaFail);

	/**
	 * 批量添加记录
	 * @param otherMediaFails
	 * @return
	 */
	int insertBatch(List<OtherMediaFail> otherMediaFails);

	/**
	 * 主键查询
	 * @param id
	 * @return
	 */
	OtherMediaFail selectByPrimaryKey(String id);

	/**
	 * 主键更新：只更新不是null值字段，字符串还要求trim()后长度不为0
	 * @param otherMediaFail
	 * @return
	 */
	int updateByPrimaryKeySelective(OtherMediaFail otherMediaFail);

	/**
	 * 主键更新
	 * @param otherMediaFail
	 * @return
	 */
	int updateByPrimaryKey(OtherMediaFail otherMediaFail);
	
	/**
	 * 条件查询
	 * @param otherMediaFailExt
	 * @return
	 */
	List<OtherMediaFail> selectByExt(OtherMediaFailExt otherMediaFailExt);
	
	/**
	 * 条件统计
	 * @param otherMediaFailExt
	 * @return
	 */
	int countByExt(OtherMediaFailExt otherMediaFailExt);
	
	/**
	 * 根据主键清除空字段，设置值为null
	 * @param fieldNames 字段名
	 * @param id 主键
	 */
	void clearEmpty(@Param("fieldNames")Set<String> fieldNames, @Param("id")String id);
	/**
	 * 精确统计(=)
	 * @author xiongxiaotun
	 * @time 2017年06月26日 10时41分
	 * @since 1.0
	 * @update
	 * @param sysPower
	 * @return
	 */
	int countRefined(OtherMediaFail otherMediaFail);
	/**
	 * 精确查询(=)
	 * @author xiongxiaotun
	 * @time 2017年06月26日 10时41分
	 * @since 1.0
	 * @update
	 * @param otherMediaFail
	 * @return
	 */
	OtherMediaFail selectRefined(OtherMediaFail otherMediaFail);
	
	/**
	 * @author xiongxiaotun <br/>
	 * @Title delectRefined  <br/>
	 * @Description 精确删除(=) <br/>
	 * @param  otherMediaFail
	 * @return
	 * @version V1.0  <br/>
	 */
	int deletedRefined(OtherMediaFail otherMediaFail);
	
	/**
	 * @author xiongxiaotun <br/>
	 * @Title: updateCommonBatch  <br/>
	 * @Description:批量修改  <br/>
	 * @param otherMediaFail 修改后数据
	 * @param ids 待修改数据ID
	 * @return
	 * @version V1.0  <br/>
	 */
	int updateCommonBatch(@Param("otherMediaFail")OtherMediaFail otherMediaFail, @Param("ids")List<String> ids);

}